package com.ruoyi.jjm.service;

import java.util.List;
import com.ruoyi.jjm.domain.ClientUser;
import com.ruoyi.jjm.domain.TownStatistics;

/**
 * 村民信息Service接口
 * 
 * @author tsr
 * @date 2020-07-15
 */
public interface IClientUserService 
{
    /**
     * 查询村民信息
     * 
     * @param id 村民信息ID
     * @return 村民信息
     */
    public ClientUser selectClientUserById(Long id);

    ClientUser selectByMasterNameAndIdCard(String masterName,String masterIdentityCardNumber);

    /**
     * 查询村民信息列表
     * 
     * @param clientUser 村民信息
     * @return 村民信息集合
     */
    public List<ClientUser> selectClientUserList(ClientUser clientUser);

    /**
     * 查询村民信息列表
     * @param input
     * @return
     */
    public List<ClientUser> selectClientUserByInput(String input,Long villageId);

    public List<ClientUser> selectClientUserOrderList(Long villageId);

    /**
     * 新增村民信息
     * 
     * @param clientUser 村民信息
     * @return 结果
     */
    public int insertClientUser(ClientUser clientUser);

    /**
     * 修改村民信息
     * 
     * @param clientUser 村民信息
     * @return 结果
     */
    public int updateClientUser(ClientUser clientUser);

    /**
     * 批量删除村民信息
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteClientUserByIds(String ids);

    /**
     * 删除村民信息信息
     * 
     * @param id 村民信息ID
     * @return 结果
     */
    public int deleteClientUserById(Long id);


    /**
     *
     * @param record
     * @return
     */
    public void batchInsertClientUsers(List<ClientUser> record);

    /**
     * 村的
     * @param villageId
     * @return
     */
    public int getAlarmCount(long villageId);

    public int getNoteCount(long villageId);

    public List<ClientUser> selectNoNoteList(long villageId);

    public List<ClientUser> selectUnistallAlarmList(long villageId);

    public List<ClientUser> selectXiangUnistallAlarmList(Long deptId);

    public List<ClientUser> selectXiangNoNoteList(Long deptId);

    public int selectXiangUninstallAlarmCount(Long deptId);

    public int selectXiangNoNoteCount(Long deptId);

    public TownStatistics selectXiangStatisitcsByXiangId(Long xiangId);


    Long countBaolianHouseNum(Long baolianrenId);

    Long sumBaolianPersonNum(Long baolianrenId);

    public Long countVillagePopulation(Long villageId);

//    Long countPopulation(Long villageId);


    /**
     * 统计乡的村包联户数
     * @param townId
     * @return
     */
    Long countBaolianHouseNumByTown(Long townId);
    /**
     * 统计乡的村包联人数
     * @param townId
     * @return
     */
    Long sumBaolianPersonNumByTown(Long townId);
}
